Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F21841980
digest.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
457 B
Referenced Files
None
Subscribers
None
digest.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.Plugs.DigestPlug
do
alias
Plug.Conn
require
Logger
def
read_body
(
conn
,
opts
)
do
{
:ok
,
body
,
conn
}
=
Conn
.
read_body
(
conn
,
opts
)
digest
=
"SHA-256="
<>
(
:crypto
.
hash
(
:sha256
,
body
)
|>
Base
.
encode64
())
{
:ok
,
body
,
Conn
.
assign
(
conn
,
:digest
,
digest
)}
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Sat, Dec 27, 11:51 PM (12 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
739521
Default Alt Text
digest.ex (457 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment