[SERVER-28052] Make SHA1Hash a full fledged class Created: 17/Feb/17  Updated: 12/Jul/17  Resolved: 24/Feb/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.2.16, 3.4.6, 3.5.4

Type: Improvement Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4, v3.2
Sprint: Sharding 2017-03-06
Participants:

 Description   

class SHA1Hash {
public:
    static StatusWith<SHA1Hash> fromBuffer(const uint8_t* input, size_t
inputLen);
 
    // The current factory functions
    static SHA1Hash computeHash(const uint8_t* input, size_t inputLen);
    static SHA1Hash computeHmac(const uint8_t* key, size_t keyLen, const
uint8_t* input, size_t inputLen);
 
    const uint8_t* data() const { return _hash.data(); }
    size_t size() const { return _hash.size(); }
 
    std::array<uint8_t, 20> asArray() const { return _hash; }
 
    std::toString() const;
    bool operator==(const SHA1Hash& rhs) const;
 
private:
    SHA1Hash() = default;
    
    std::array<uint8_t, 20> _hash;
};



 Comments   
Comment by Githook User [ 11/Jul/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Make SHA1Hash a full fledged class

(cherry picked from commit 71ce59a2648185c8e1ccd5b3a1af6ff05dbac7d7)
(cherry picked from commit 2e686c169d07ed06530aa650ced310ee7b1adfc6)
Branch: v3.2
https://github.com/mongodb/mongo/commit/b686a69d6ed4653c6973dc62b50eb7b40df87fd4

Comment by Githook User [ 11/Jul/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Remove unused header

(cherry picked from commit a074f336bfb9ced96c441cffc135da4642dc7a7b)
(cherry picked from commit 77668063a90fb7c9edc9bd737c776d33ba1ec878)
Branch: v3.2
https://github.com/10gen/mongo-enterprise-modules/commit/526bb56025024737ba39a56b37dfdbbcf7f2d059

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Remove unused header

(cherry picked from commit a074f336bfb9ced96c441cffc135da4642dc7a7b)
Branch: v3.4
https://github.com/10gen/mongo-enterprise-modules/commit/77668063a90fb7c9edc9bd737c776d33ba1ec878

Comment by Githook User [ 19/Jun/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Make SHA1Hash a full fledged class

(cherry picked from commit 71ce59a2648185c8e1ccd5b3a1af6ff05dbac7d7)
Branch: v3.4
https://github.com/mongodb/mongo/commit/2e686c169d07ed06530aa650ced310ee7b1adfc6

Comment by Githook User [ 24/Feb/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Make SHA1Hash a full fledged class
Branch: master
https://github.com/mongodb/mongo/commit/71ce59a2648185c8e1ccd5b3a1af6ff05dbac7d7

Comment by Githook User [ 24/Feb/17 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-28052 Remove unused header
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/a074f336bfb9ced96c441cffc135da4642dc7a7b

Generated at Thu Feb 08 04:16:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.