I am using GNAT.SHA1 to create a SHA1 hash of a string in Ada. My code base is small, so I'd like to avoid importing any libraries to the project that aren't provided by my compiler, hence I'm using GNAT.SHA1. As far as I'm aware, the only "public" methods for retrieving the hash is in String form via the Digest function. I would like to instead get the 160-bit block that is the H member of the Context type. Unfortunately, the Context record is private. Is there any way I can get at it? Or is their an alternative method provided by GNAT or the Ada standard library?
Getting the SHA1 block from GNAT.SHA1
502 Views Asked by Anthony At
1
There are 1 best solutions below
Related Questions in SHA1
- SSL certificate error 403.13 in IIS 7.5
- Data signing with Azure KeyVault and SHA1 hashing algorithm
- Translate HmacSHA1 checksum generating method from Java to PHP
- Generate signature using private key with OpenSSL API
- Different sha1 hashes calculated in PHP vs Node.js
- Will identical files in different locations have different sha1 hashes?
- How to change SHA1 fingerprint in an android app
- Attempting to use SHA1 hashing to send password to Google
- SHA-1 in haskell producing wrong hashes
- how to base64 encode an unsigned byte array which is actually a int[]
- How to increment the value of an unsigned char *
- Converting SHA1 string encryption code from objective-c to swift
- Get SHA1 sign of string with DSA private key from PEM file
- Can android certificate fingerprint sha1 use in firebase and Google Place API?
- Verify signature
Related Questions in ADA
- How do you get files with extension from folder in Ada95?
- Ada Encapsulated Library Project GNAT
- Technical explanation for discrepancy in uninitialized variable in Ada?
- Ada Function Parameter as Access Type or Not
- GTK: Using an Offscreen Window to investigate the rendered dimensions of widgets
- Ada83 Constraint Error not Present in Watch Window
- Can't find GNAT GPS Dependencies Form
- Ada dynamic array allocation index range
- Ada toolchain for Windows CE
- How can I migrate an application written in DEC Ada to Windows?
- How to check if task is terminated in Ada
- Ada : String legal value?
- How to print first n lines of a variable with GDB?
- Is the Ada programming language still relevant in the military?
- Out parameter undefined
Related Questions in GNAT
- Ada Encapsulated Library Project GNAT
- Can't find GNAT GPS Dependencies Form
- Error building Ada Web Server (AWS) on macOS Sierra
- Why is Dynamic_Predicate not working?
- Is there a way to modify the .adt file directly?
- Spec not allow body (remove in gpr file) without touching source files
- Ada gprbuild hangs on initialization
- Package not visible error
- Command line for Ada version?
- Ada Slicing with Strings
- Preconditions don't work with GNAT?
- Ada enumerations with duplicate values
- Getting the SHA1 block from GNAT.SHA1
- Abort statement
- How to get gcc's search path for Ada specs
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I don't know of any direct way to get the 160-bit block, but of course you can compute it from the hexadecimal string.
Here's an example I just threw together. (Granted, extracting 32-bit integers by adding
"16#"and"#"to the hex substring may not be the most elegant solution.The output is: