{"id":26777250,"url":"https://github.com/timothymeadows/blackfeatherjs","last_synced_at":"2026-05-03T04:36:49.760Z","repository":{"id":57171278,"uuid":"65493043","full_name":"TimothyMeadows/blackfeatherjs","owner":"TimothyMeadows","description":"Blackfeather in JavaScript / Node","archived":false,"fork":false,"pushed_at":"2018-02-19T15:18:04.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T17:50:47.045Z","etag":null,"topics":["compression","compressionjs","cryptology","cryptologyjs","javascript","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimothyMeadows.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-11T18:39:17.000Z","updated_at":"2017-10-19T17:18:11.000Z","dependencies_parsed_at":"2022-08-27T12:02:13.559Z","dependency_job_id":null,"html_url":"https://github.com/TimothyMeadows/blackfeatherjs","commit_stats":null,"previous_names":["timothymeadows/blackfeather-javascript"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Fblackfeatherjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Fblackfeatherjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Fblackfeatherjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyMeadows%2Fblackfeatherjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyMeadows","download_url":"https://codeload.github.com/TimothyMeadows/blackfeatherjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140550,"owners_count":20729799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","compressionjs","cryptology","cryptologyjs","javascript","nodejs"],"created_at":"2025-03-29T04:49:19.549Z","updated_at":"2026-05-03T04:36:49.704Z","avatar_url":"https://github.com/TimothyMeadows.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blackfeather in JavaScript / Node\n# Installing\n## Browser\n```html\n  \u003cscript src=\"blackfeather-2.0.0.min.js\"\u003e\u003c/script\u003e\n```\nYou can also convert the main node js module into your own module with browserify at any time.\n```base\n    npm install -g browserify\n    browserify blackfeather-2.0.0.js -o blackfeather.2.0.0.min.js\n```\n## Node.js\n### https://www.npmjs.com/package/Blackfeather\n```bash\n  npm install Blackfeather --save\n```\n## Nuget\n### https://www.nuget.org/packages/blackfeatherjs\n```bash\n  Install-Package blackfeatherjs\n```\n## Source\n```bash\n  git clone https://github.com/TimothyMeadows/blackfeatherjs\n```\n\n# Blackfeather.Data.ManagedMemory\nThs is a helper class for storing data in memory in JavaScript. It supports serialization between languages allowing you to import, and, export serializable types.\n\n## ManagedMemorySpace\nModel that data in memory is read, and, written too.\n```javascript\n  Blackfeather.Data.ManagedMemorySpace = function (pointer, name, value, created, accessed, updated) {\n    this.Created = created; // unix time\n    this.Accessed = accessed; // unix time\n    this.Updated = updated; // unix time\n    this.Pointer = pointer; // string\n    this.Name = name; // string\n    this.Value = value; // any\n  };\n```\n## Read(ponter:string, name:string):ManagedMemorySpace\nRead entry from memory that matches the pointer, and, name.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  var caw = memory.Read(\"birds\", \"raven\");\n  console.log(caw);\n```\n## ReadAll(ponter:string):[ManagedMemorySpace]\nRead all entries from memory that matches the pointer.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  var birds = memory.ReadAll(\"birds\");\n  console.log(birds);\n```\n## Write(ponter:string, name:string, value:any):void\nWrite entry into memory. Remove any previous entry that matches the pointer, and, name.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  memory.Write(\"birds\", \"raven\", \"caw\");\n```\n## WriteAll(spaces:[ManagedMemorySpace]):void\nWrite all entres into memory. Remove any previous entries that matches the pointer, and, name.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  var spaces = [new Blackfeather.Data.ManagedMemorySpace(\"birds\", \"raven\", \"caw\", 0, 0, 0)];\n  \n  memory.WriteAll(spaces);\n```\n## Delete(ponter:string, name:string):void\nRemove any entry from memory that matches the pointer, and, name.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  memory.Delete(\"birds\", \"raven\");\n```\n## DeleteAll(ponter:string):void\nRemove all entries from memory that matches the pointer.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  memory.DeleteAll(\"birds\");\n```\n## Import(memory:ManagedMemory):void\nLoad ManagedMemory class as current MangedMemory class.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  var memory2 = new Blackfeather.Data.ManagedMemory();\n  memory.Import(memory2);\n```\n## Export():ManagedMemory\nReturn current ManagedMemory class.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  var memory2 = memory.Export();\n```\n## Clear():void\nRemove all entries from memory. Leaves memory still usable.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  memory.Clear();\n```\n## Dispose():void\nRemove all entries from memory. Leaves memory unusable until reconstructed.\n```javascript\n  var memory = new Blackfeather.Data.ManagedMemory();\n  memory.Dispose();\n```\n# Blackfeather.Data.Compression\nThis is a collection of usable compression libraries in JavaScript. Right now only LZStrng is supported.\n\n# LZString \n## Compress(data:string):string\n```javascript\n  var compressed = Blackfeather.Data.Compression.LZString.Compress(\"caw caw caw!\");\n  console.log(compressed);\n```\n## Decompress(data:string):string\n```javascript\n  var decompressed = Blackfeather.Data.Compression.LZString.Decompress(\n    Blackfeather.Data.Compression.LZString.Compress(\"caw caw caw!\")\n  );\n  console.log(compressed);\n```\n# Blackfeather.Data.Encoding\n# extEncoding\n```text\n  Latin1\n  Utf8\n  Utf16\n  Utf16BigEndian\n  Utf16LittleEndian\n```\n# BinaryEncoding\n```text\n  Hex\n  Base64\n```\n# Blackfeather.Security.Cryptology\n```javascript\n  Blackfeather.Security.Cryptology.SaltedData = function () {\n    this.Data = null;\n    this.Salt = null;\n  }\n```\n# Blackfeather.Security.Cryptology.SecureRandom\n## NextBytes(length:number):string\nReturns random bytes to the specified length.\n```javascript\n  var rng = new Blackfeather.Security.Cryptology.SecureRandom().NextBytes(16);\n  console.log(rng);\n```\n## NextBigInt(length:number):string\nReturns random bytes to the specified length.\n```javascript\n  var rng = new Blackfeather.Security.Cryptology.SecureRandom().NextBigInt(2048);\n  console.log(rng);\n```\n## Next(min:number, max:number):number\nReturns random bytes to the specified length.\n```javascript\n  var rng = new Blackfeather.Security.Cryptology.SecureRandom().Next(32, 134);\n  console.log(rng);\n```\n# Blackfeather.Security.Cryptology.Kdf\n## Compute(data:string, salt:Base64, length:number):SaltedData\nCompute PBKDF2 returning SaltedData.\n```javascript\n  var kdf = new Blackfeather.Security.Cryptology.Kdf().Compute(\n    \"caw caw caw!\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\",\n    32\n  );\n  console.log(kdf);\n```\n# Blackfeather.Security.Cryptology.Hash\n## ComputeSalted(data:string, salt:Base64):SaltedData\nCompute SHA256 wth PBKDF2 returning SaltedData.\n```javascript\n  var hash = new Blackfeather.Security.Cryptology.Hash().Compute(\n    \"caw caw caw!\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\"\n  );\n  console.log(hash);\n```\n# Blackfeather.Security.Cryptology.Hmac\n## ComputeSalted(data:string, key:string, salt:Base64):SaltedData\nCompute HMAC-SHA256 wth PBKDF2 returning SaltedData.\n```javascript\n  var hmac = new Blackfeather.Security.Cryptology.Hmac().Compute(\n    \"caw caw caw!\",\n    \"water123\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\"\n  );\n  console.log(hmac);\n```\n# Blackfeather.Security.Cryptology.EncryptionInMotion\n## Compute(data:string, password:string, salt:Base64, secondaryVerifier:string):SaltedData\nCompute authentcated AES-CTR wth HMAC-SHA256, and, PBKDF2.\n```javascript\n  var cipher = new Blackfeather.Security.Cryptology.EncryptionInMotion().Compute(\n    \"caw caw caw!\",\n    \"water123\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\",\n    \"321retaw\"\n  );\n  console.log(cipher);\n```\n# Blackfeather.Security.Cryptology.DecryptionInMotion\n## Compute(data:string, password:string, salt:Base64, secondaryVerifier:string):string\nCompute authentcated AES-CTR wth HMAC-SHA256, and, PBKDF2.\n```javascript\n  var plain = new Blackfeather.Security.Cryptology.DecryptionInMotion().Compute(\n    \"cJHuTYcAV5j798aJuSwPtLcemE86qhXOPDfRWQffIzwVUqctciDLIZNFspmBB3ym7hwVvydcsJeqtE/HmiLwiJCbu6Pwq/V5NZopupTq00BO34PMeQ+DcOkZvKrA/mLlxB0uZO3clclmMXj9+hfLtKKdNnGJTYHWg4dJEg==\",\n    \"water123\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\",\n    \"321retaw\"\n  );\n  console.log(plain);\n```\n# Blackfeather.Security.Cryptology.EncryptionAtRest\n## Compute(data:string, password:string, salt:Base64, secondaryVerifier:string):SaltedData\nCompute authentcated AES-CTR wth HMAC-SHA256, and, PBKDF2.\n```javascript\n  var cipher = new Blackfeather.Security.Cryptology.EncryptionAtRest().Compute(\n    \"caw caw caw!\",\n    \"water123\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\",\n    \"321retaw\"\n  );\n  console.log(cipher);\n```\n# Blackfeather.Security.Cryptology.DecryptionAtRest\n## Compute(data:string, password:string, salt:Base64, secondaryVerifier:string):string\nCompute authentcated AES-CTR wth HMAC-SHA256, and, PBKDF2.\n```javascript\n  var plain = new Blackfeather.Security.Cryptology.DecryptionAtRest().Compute(\n    \"1SYn3HBRIDCYaMPSoJAsMc8iwOwjb7JRjq+wyhjEB+Xvo0rbVWTgqgPk/cBKZqv0Bk+ioUzly29hdZmCtfQzi/CfiUK6fAl7pnE5HyGO1AcUHi9wxXxlkiC/FQGKpt81LNQVHu+vmW4oFIProNrbqv9UzGW9eLfOC6UqCANEIDs=\",\n    \"water123\",\n    \"tNfyIx2PZjf6C+KC9N7Ydg==\",\n    \"321retaw\"\n  );\n  console.log(plain);\n```\n# Blackfeather.Security.Cryptology.KeyExchange\n```javascript\nar client = new Blackfeather.Security.Cryptology.KeyExchange().Mix();\nvar serverPublic = \"10072451067358128667370122172133565286426273520457081541202696009092543305211841094697906349575345674115923241301922156530480175764026481816770507437923200637573363088905607034558695241173246307009995878117784478243313131685968854799300800700691656662848606744118040971840314947233291339212661690749394423715891911134762717021019928988569780826551116299625361903924016859140944701252642684457210980390047869449067290007099386872773076553494951935303123004213090275240758545751867197472450416424811618764768165224643793362948959692975844359439266365789906954808980720889327586602558296556297716800168958101769299242493\";\n\nvar KeyPair = new Blackfeather.Security.Cryptology.KeyExchange().KeyPair;\nvar clientHandshake = new KeyPair(client.Private, serverPublic);\nvar clientSecret = new Blackfeather.Security.Cryptology.KeyExchange().Remix(clientHandshake);\nconsole.log(client);\nconsole.log(clientSecret);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymeadows%2Fblackfeatherjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothymeadows%2Fblackfeatherjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothymeadows%2Fblackfeatherjs/lists"}