Task

Find, through brute force, the five-letter passwords corresponding with the following SHA-256 hashes:

1. 1115dd800feaacefdf481f1f9070374a2a81e27880f187396db67958b207cbad
2. 3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b
3. 74e1bb62f8dabb8125a58852b63bdf6eaef667cb56ac7f7cdba6d7305c50a22f

Your program should naively iterate through all possible passwords consisting only of five lower-case ASCII English letters. It should use concurrent or parallel processing, if your language supports that feature. You may calculate SHA-256 hashes by calling a library or through a custom implementation. Print each matching password, along with its SHA-256 hash.

Related task: SHA-256

UseSHA2Fingerprint()
 
NewList sha256fp.s()
AddElement(sha256fp()) : sha256fp() = "1115dd800feaacefdf481f1f9070374a2a81e27880f187396db67958b207cbad"
AddElement(sha256fp()) : sha256fp() = "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"
AddElement(sha256fp()) : sha256fp() = "74e1bb62f8dabb8125a58852b63bdf6eaef667cb56ac7f7cdba6d7305c50a22f"
 
Procedure PrintCode(n.i)
  Shared sha256fp()  
  SelectElement(sha256fp(), n) : fp$ = sha256fp()
  For c1 = 'a' To 'z'
    For c2 = 'a' To 'z'
      For c3 = 'a' To 'z'
        For c4 = 'a' To 'z'
          For c5 = 'a' To 'z'                        
            If fp$ = StringFingerprint(Chr(c1) + Chr(c2) + Chr(c3) + Chr(c4) + Chr(c5), #PB_Cipher_SHA2, 256); maybe set enconding
              PrintN(Chr(c1) + Chr(c2) + Chr(c3) + Chr(c4) + Chr(c5) + " => " + fp$)
              Break(5)
            EndIf            
          Next c5
        Next c4
      Next c3
    Next c2
  Next c1    
EndProcedure
 
Dim mythread(ListSize(sha256fp()))
 
If OpenConsole("")  
  StartTime.q = ElapsedMilliseconds()
 
  For i=0 To ListSize(sha256fp()) - 1
    mythread(i)=CreateThread(@PrintCode(), i)
  Next 
  For i=0 To ListSize(sha256fp()) - 1
    WaitThread(mythread(i))
  Next
 
  PrintN("-----------")
  PrintN(Str(ElapsedMilliseconds() - StartTime)+" Milliseconds needed")
  Input()
EndIf
End
; EnableThread