diff options
author | Jason Carey <jcarey@argv.me> | 2017-07-18 16:13:32 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2017-07-25 10:48:44 -0400 |
commit | ffe9014101f7bd53ed9674b770e9371324fcdf34 (patch) | |
tree | 7f1051ee8d382d41cc56cf61ce39949b50ea8133 /src/mongo/crypto/sha256_block.idl | |
parent | 4e27af1e980a5f5479fc26a3d616a5b56245261a (diff) | |
download | mongo-ffe9014101f7bd53ed9674b770e9371324fcdf34.tar.gz |
SERVER-30218 Add SHA256 Support
The addition of a SHA256Block will give us the flexibility to handle new
workloads that aren't appropriate for SHA1.
As part of this change, let's make the current code templatized so we
can limit as strongly as possible the duplication of code between sha1
and sha256.
Diffstat (limited to 'src/mongo/crypto/sha256_block.idl')
-rw-r--r-- | src/mongo/crypto/sha256_block.idl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mongo/crypto/sha256_block.idl b/src/mongo/crypto/sha256_block.idl new file mode 100644 index 00000000000..25343a990db --- /dev/null +++ b/src/mongo/crypto/sha256_block.idl @@ -0,0 +1,33 @@ +# Copyright (C) 2017 MongoDB Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License, version 3, +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +# SHA256Block type + +global: + cpp_namespace: "mongo" + cpp_includes: + - "mongo/crypto/sha256_block.h" + +imports: + - "mongo/idl/basic_types.idl" + +types: + sha256Block: + bson_serialization_type: bindata + bindata_subtype: generic + description: "A fixed-size byte array that holds the result of a SHA256 computation" + cpp_type: mongo::SHA256Block + serializer: "mongo::SHA256Block::toCDR" + deserializer: "mongo::SHA256Block::fromBinData" |